// 配置全局信息
:root {
  // primary
  --primary-color: #2595A6;
  --background-color: #24363D;
  --navigation-color: #24363D;
  --content-color: #2595A6;
  --font-family: "微软雅黑", TeX Gyre Adventor-Bold, TeX Gyre Adventor, monospace;
  --font-color: white;
  --font-size: 16px;

  // margin、padding、border
  --border-color: #2595A6;
  --border-radius: 5px 5px 5px 5px;
  --padding-width: 15px;
  --margin-width: 15px;
  --span-width: 10px;
  --item-height: 30px;

  // input和select
  --placeholer-color: black;
  --input-background-color: #eee;
  --select-background-color: #eee;
  --input-font-color: rgba(0, 0, 0, .65);
  --select-font-color: rgba(0, 0, 0, .65);
  --input-height: 36px;

  // radio
  --list-item-content-color: black;

  // dialog
  --dialog-background-color: #24363D;
  --dialog-submit-color: #2595A6;
  --dialog-cancel-color: #aaa;

  // toast
  --toast-background-color: #2595A6;
  --toast-font-color: white;

  // popup
  --popup-background-color: #24363D;
  --popup-header-background-color: #24363D;
  --popup-article-background-color: #24363D;
  --popup-closer-color: white;
  --popup-header-font-size: 16px;

  // table
  --table-background-color: black;
  --table-th-background-color: black;
  --table-tr-background-color: black;
  --table-tr-hover-color: #24363D;

  // pannel
  --pannel-background-color: #24363D;
  --pannel-content-background-color: black;
  --pannel-item-background-color: black;
  --pannel-item-hover-color: none;
  --pannel-header-font-size: 16px;

  // ol
  --ol-viewport-background-color: #3b4453;
  --ol-popup-background-color: #24363D;
  --ol-popup-chart-background-color: #24363D;

  // chart

  // f7基础样式
  --f7-theme-color: var(--primary-color);
  --f7-menu-dropdown-pressed-bg-color: var(--content-color);

  // f7 => toast
  --f7-toast-text-color: white;
  --f7-toast-font-size: 14px;
  --f7-toast-icon-size: 48px;
  --f7-toast-max-width: 568px;

  // treeview
  --f7-treeview-toggle-color: rgba(255, 255, 255, 0.5);
  --f7-treeview-toggle-hover-bg-color: rgba(255, 255, 255, 0.03);
  --f7-treeview-toggle-pressed-bg-color: rgba(255, 255, 255, 0.1);
  --f7-treeview-icon-color: rgba(255, 149, 0, 1);
  --f7-treeview-selectable-hover-bg-color: rgba(255, 255, 255, 0.03);
  --f7-treeview-link-hover-bg-color: rgba(255, 255, 255, 0.03);
  --f7-treeview-link-pressed-bg-color: rgba(255, 255, 255, 0.11);

  // table
  --table-header-font-size: 14px;
  --table-row-font-size: 12px;
  --f7-table-head-font-size: 12px;
  --f7-table-body-font-size: 14px;
  --f7-table-footer-font-size: 12px;
  --f7-table-input-height: 24px;
  --f7-table-input-font-size: 14px;
  --f7-table-collapsible-cell-padding: 16px;
  --f7-table-link-icon-only-icon-size: 20px;
  --f7-table-head-bg-color: transparent;
  --f7-table-card-header-bg-color: transparent;
  --f7-table-card-header-height: 64px;
  --f7-table-cell-padding-vertical: 0px;
  --f7-table-sortable-icon-color: #000;
}

@import "style";

.color-toggle {
  background: #aaa;
}

#mapfile-search {
  line-height: 48px;
  font-size: 30px;
  border-radius: 3px;
  color: white;
  background: var(--primary-color);
  cursor: pointer;
}


.mosuePosition {
  padding-left: 5px;
  padding-top: 5px;
  color: white;
}

.color-primary {
  background: var(--primary-color);
}

.selected {
  background: var(--background-color) !important;
  background: #dddddd;
}

header {
  width: 100vw;
  height: 60px;
  background-color: var(--navigation-color);

  div {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: start;

    .title {
      margin-left: var(--margin-width);
      h1 {
        color: white;
        font-size: 1.4em;
        height: 30px;
        font-weight: bold;
        display: flex;
        flex-direction: column;
        justify-content: end;
      }

      #tools {
        width: var(--item-height);
        height: var(--item-height);
        margin-left: 30px;
      }
    }

    .monitor {
      display: flex;
      justify-content: end;
      align-items: center;

      .monitor-wrap {
        padding: 0;
        width: 107px;
        height: 30px;
        box-sizing: border-box;
        background: var(--monitor-color);
        border: solid 1px var(--border-color);
        margin: 0 var(--span-width);
        border-radius: var(--border-radius);
        display: flex;
        justify-content: start;
        align-items: center;

        img {
          width: 20px;
          height: 20px;
          margin-left: var(--span-width);
        }

        span {
          height: 24px;
          margin-left: 5px;
        }
      }
    }

    .function {
      padding-left: var(--padding-width);
      display: flex;
      justify-content: start;
      align-content: center;

      .alarm {
        width: 30px;
        height: 30px;
        margin-right: var(--margin-width);
        position: relative;
        img {
          width: 100%;
          height: 100%;
        }
        span {
          width: 20px;
          height: 20px;
          border-radius: 50%;
          background: var(--primary-color);
          position: absolute;
          display: flex;
          justify-content: center;
          align-items: center;
          font-size: 9px;
          top: -10px;
          left: 15px;
        }
      }
    }
  }
}

.subnavbar-inner {
  background: var(--background-color);
  padding: 0;

  .tab-link {
    color: white;
  }

  .tab-link.tab-link-active {
    background: var(--primary-color);
  }
}

.ol-popup {
  position: absolute;
  color: var(--font-color);
  background-color: var(--ol-popup-background-color);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  padding: var(--padding-width);
  border-radius: var(--border-radius);
  bottom: 12px;
  left: -50px;
  width: 400px;
  height: 160px;

  .ol-popup-title {
    padding-top: var(--padding-width);

    .ol-popup-title-left {
      display: flex;
      flex-flow: column;
      justify-content: center;
      align-items: center;
      height: 100%;

      img {
        margin-top: 10px;
        width: 60px;
        height: 60px;
      }

      h2 {
        margin-top: 10px;
      }
    }

    .ol-popup-title-right {
      display: flex;
      flex-flow: column;
      justify-content: space-between;

      span {
        display: block;
        margin-top: var(--margin-width);
        cursor: pointer;
        color: var(--primary-color);
      }
    }

    .ol-popup-title-chart {
      width: 370px;
      height: 250px;
      position: relative;

      span {
        position: absolute;
        top: 0;
        right: 30px;
        display: block;
        background: var(--ol-popup-chart-background-color);
        border-radius: var(--border-radius);
        padding: 0 5px;
        cursor: pointer;
      }
    }
  }

  //&:after {
  //  top: 100%;
  //  content: " ";
  //  height: 0;
  //  width: 0;
  //  position: absolute;
  //  pointer-events: none;
  //  border: 10px solid transparent;
  //  border-top-color: var(--background-color);
  //  left: 48px;
  //  margin-left: -10px;
  //}
  //
  //&:before {
  //  top: 100%;
  //  content: " ";
  //  height: 0;
  //  width: 0;
  //  position: absolute;
  //  pointer-events: none;
  //  border: 11px solid transparent;
  //  border-top-color: var(--border-color);
  //  left: 48px;
  //  margin-left: -11px;
  //}

  .ol-popup-pin {
    color: orange;
    position: absolute;
    width: 8px;
    height: 8px;
    top: 2px;
    right: 32px;
    cursor: pointer;
  }

  .ol-popup-closer {
    text-decoration: none;
    position: absolute;
    top: 2px;
    right: 8px;

    &:after {
      content: "✖";
    }
  }
}
